import java.util.HashSet;

public class Demo3PersonTest {

    public static void main(String[] args) {
        HashSet <Person> hashSet=new HashSet<>();

        Person p1=new Person("蒋恬1",200);
        Person p2=new Person("蒋恬2",201);
        Person p3=new Person("蒋恬3",203);

        hashSet.add(p1);
        hashSet.add(p2);
        hashSet.add(p3);

        hashSet.add(new Person("蒋恬3",203));
        System.out.println("元素个数"+hashSet.size());
        System.out.println(hashSet);




    }
}
